function updateSucceed(){
    console.log('success');
    $('#forAnnouncement').html('<div class="alert alert-info alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button><strong>ההתראות להורים נשלחו בהצלחה!</strong></div>');
}

function updateParents(){
    console.log('update patent');
    $('#approveModal').modal('hide');
    
    $.ajax('/updateParents', {
        type: 'POST',
        success: updateSucceed
    });
}

$(document).ready(function(){
    $('#sendUpadate').click(updateParents);
});